/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import javax.persistence.Entity;

/**
 *
 * @author Lu Xiaodi
 */
@Entity
public class FoodItem extends Item implements Serializable {

    private static final long serialVersionUID = 1L;
    private Double price;
    private Boolean locked; 
    private Long outletId;
    private String stakeholderName;
    private String type;
    private String pathName;

    public Boolean getLocked() {
        return locked;
    }

    public void setLocked(Boolean locked) {
        this.locked = locked;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Long getOutletId() {
        return outletId;
    }

    public void setOutletId(Long outletId) {
        this.outletId = outletId;
    }

    public String getPathName() {
        return pathName;
    }

    public String getType() {
        return type;
    }

    public void setType(String itemType) {
        this.type = itemType;
    }

    public String getStakeholderName() {
        return stakeholderName;
    }

    public void setStakeholderName(String stakeholderName) {
        this.stakeholderName = stakeholderName;
    }
    
    public void setPathName(String pathName) {
        this.pathName = pathName;
    }

    public String getIsLockedStr() {
        return this.boolToStr(locked);
    }

    private String boolToStr(Boolean b) {
        if (b) {
            return "yes";
        } else {
            return "no";
        }
    }

    @Override
    public String toString() {
        return "FoodItem: id="+this.id+"  name="+this.name+" locked=" + this.locked
                +" Outlet id=" + this.outletId;
    }
}